home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / DEV / I-Z / ResExpress 1.0.sea / ResExpress 1.0 / ResX DevKit / Think Pascal / RXVW Shell.p < prev    next >
Text File  |  1991-07-05  |  2KB  |  57 lines

  1. {RXVW Shell for ResX Views}
  2.  
  3. {To compile in Think Pascal:}
  4.  
  5. {   1) Set Project Type to 'Code Resource' }
  6. {   2) Set the File TYPE to 'RXXT' and File Creator to 'ResX'}
  7. {   3) Set the Resource TYPE to 'RXVW' }
  8. {   4) Set the Resource NAME to the resource type you are making a view for. }
  9. {        If you are making an ICON editor/viewer, set the name to 'ICON' }
  10. {   5) Add this file, DRVRRuntime.lib, and Interface.lib to the project }
  11. {   6) Compile the code resource. }
  12. {   7) Install it in ResX via the 'Externals->Install' menu. }
  13.  
  14.  
  15.  
  16. unit ShowCursor;
  17.  
  18.  
  19. interface
  20.     procedure main (ResHandle: Handle);  {Handle of the current selected resource}
  21.  
  22.  
  23. implementation
  24.     procedure main;
  25.         var
  26.             fileID, rsrID: integer;
  27.             rsrType: ResType;
  28.             rsrName: Str255;
  29.             HState: SignedByte;
  30.  
  31.     begin
  32.  
  33.      {Only the Handle to the resource is given.  If you need info, do this:  }
  34.         GetResInfo(ResHandle, rsrID, rsrType, rsrName);      {Get the resource info of the handle}
  35.  
  36.      {If you want access to the file owned by the resource do this: }
  37.         fileID := HomeResFile(ResHandle);                               {Find out the file id of the resource}
  38.  
  39.         HState := HGetState(ResHandle);       {This is mandatory!}
  40.         LoadResource(ResHandle);                 {This is necessary if you plan to use it. }
  41.                                                               {ResX doesn't load it.}
  42.  
  43.  
  44.  
  45.      {.......}
  46.      {main code here}
  47.      {.......}
  48.  
  49.  
  50.  
  51.         HSetState(ResHandle, HState);          {This is mandatory!}
  52.  
  53.      {Do NOT release the resource or dispose the handle, ResX will do it if necessary. }
  54.      {This is critical in case the resource is being used by a currently running application. }
  55.  
  56.     end;
  57. end.